<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Logagent: plugins/logagent-plugin-api.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Logagent
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_38c8d24aef3972a7f87b834274e76e31.html">plugins</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">logagent-plugin-api.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="logagent-plugin-api_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright (c) 2018 Steven Lee &lt;geekerlw@gmail.com&gt;</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining a copy</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * of this software and associated documentation files (the &quot;Software&quot;), to deal</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * in the Software without restriction, including without limitation the rights</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * copies of the Software, and to permit persons to whom the Software is</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * furnished to do so, subject to the following conditions:</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * The above copyright notice and this permission notice shall be included in all</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * copies or substantial portions of the Software.</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#ifndef __LOGAGENT_PLUGIN_API_H__</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#define __LOGAGENT_PLUGIN_API_H__</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="logagent-plugin-list_8h.html">logagent-plugin-list.h</a>&quot;</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;</div><div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="logagent-plugin-api_8h.html#ab6bc945ce840e4f0a16ec0fb12acc1a0">   20</a></span>&#160;<span class="preprocessor">#define MAX_LOG_SIZE    1024 </span></div><div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="structlog__t.html">   22</a></span>&#160;<span class="preprocessor">typedef struct {</span></div><div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="structlog__t.html#a337166262ebfd8efb1381c757d3e57e6">   23</a></span>&#160;    <span class="keywordtype">char</span> log[<a class="code" href="logagent-plugin-api_8h.html#ab6bc945ce840e4f0a16ec0fb12acc1a0">MAX_LOG_SIZE</a>]; </div><div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="structlog__t.html#a1f00f18b91d5a820f2c43064243aa86e">   24</a></span>&#160;    <span class="keyword">struct </span><a class="code" href="structlist__head.html">list_head</a> list; </div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;} <a class="code" href="structlog__t.html">log_t</a>;</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="keywordtype">void</span> <a class="code" href="logagent-plugin-api_8h.html#aa8dbecc44cb99a92ba93141441d0a033">logagent_log_add</a>(<span class="keyword">struct</span> <a class="code" href="structlist__head.html">list_head</a> *log_list, <span class="keyword">const</span> <span class="keywordtype">char</span> *log);</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="keywordtype">void</span> <a class="code" href="logagent-plugin-api_8h.html#ad92bf07e1fcc20b58296e564da85da37">logagent_log_remove</a>(<span class="keyword">struct</span> <a class="code" href="structlist__head.html">list_head</a> *pos);</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="logagent-plugin-api_8h.html#a9f828a69257b510a17907c1a3ffc29d1">logagent_plugin_env_init</a>(<span class="keywordtype">void</span> **context);</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="logagent-plugin-api_8h.html#a993c424dc9f4fd7e198666a94fa06c63">logagent_plugin_env_destroy</a>(<span class="keywordtype">void</span> **context);</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="logagent-plugin-api_8h.html#ad169bca8e73b3ae8c0374e3971f43039">logagent_plugin_work</a>(<span class="keywordtype">void</span> *gconfig, <span class="keywordtype">void</span> *pconfig,</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;                <span class="keyword">struct</span> <a class="code" href="structlist__head.html">list_head</a> *log_list);</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="logagent-plugin-api_8h.html#ae01dcc8ad838b79d7441a7b804f9f6c7">logagent_plugin_init</a>(<span class="keywordtype">void</span> *gconfig, <span class="keywordtype">void</span> **context);</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="logagent-plugin-api_8h.html#a95dd35e4770fc0510fcc668e78aabd36">logagent_plugin_exit</a>(<span class="keywordtype">void</span> *gconfig, <span class="keywordtype">void</span> **context);</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="logagent-plugin-list_8h_html"><div class="ttname"><a href="logagent-plugin-list_8h.html">logagent-plugin-list.h</a></div></div>
<div class="ttc" id="structlog__t_html"><div class="ttname"><a href="structlog__t.html">log_t</a></div><div class="ttdef"><b>Definition:</b> logagent-plugin-api.h:22</div></div>
<div class="ttc" id="structlist__head_html"><div class="ttname"><a href="structlist__head.html">list_head</a></div><div class="ttdef"><b>Definition:</b> logagent-list.h:26</div></div>
<div class="ttc" id="logagent-plugin-api_8h_html_ad92bf07e1fcc20b58296e564da85da37"><div class="ttname"><a href="logagent-plugin-api_8h.html#ad92bf07e1fcc20b58296e564da85da37">logagent_log_remove</a></div><div class="ttdeci">void logagent_log_remove(struct list_head *pos)</div></div>
<div class="ttc" id="logagent-plugin-api_8h_html_a993c424dc9f4fd7e198666a94fa06c63"><div class="ttname"><a href="logagent-plugin-api_8h.html#a993c424dc9f4fd7e198666a94fa06c63">logagent_plugin_env_destroy</a></div><div class="ttdeci">int logagent_plugin_env_destroy(void **context)</div></div>
<div class="ttc" id="logagent-plugin-api_8h_html_ad169bca8e73b3ae8c0374e3971f43039"><div class="ttname"><a href="logagent-plugin-api_8h.html#ad169bca8e73b3ae8c0374e3971f43039">logagent_plugin_work</a></div><div class="ttdeci">int logagent_plugin_work(void *gconfig, void *pconfig, struct list_head *log_list)</div></div>
<div class="ttc" id="logagent-plugin-api_8h_html_a95dd35e4770fc0510fcc668e78aabd36"><div class="ttname"><a href="logagent-plugin-api_8h.html#a95dd35e4770fc0510fcc668e78aabd36">logagent_plugin_exit</a></div><div class="ttdeci">int logagent_plugin_exit(void *gconfig, void **context)</div></div>
<div class="ttc" id="logagent-plugin-api_8h_html_ab6bc945ce840e4f0a16ec0fb12acc1a0"><div class="ttname"><a href="logagent-plugin-api_8h.html#ab6bc945ce840e4f0a16ec0fb12acc1a0">MAX_LOG_SIZE</a></div><div class="ttdeci">#define MAX_LOG_SIZE</div><div class="ttdef"><b>Definition:</b> logagent-plugin-api.h:20</div></div>
<div class="ttc" id="logagent-plugin-api_8h_html_aa8dbecc44cb99a92ba93141441d0a033"><div class="ttname"><a href="logagent-plugin-api_8h.html#aa8dbecc44cb99a92ba93141441d0a033">logagent_log_add</a></div><div class="ttdeci">void logagent_log_add(struct list_head *log_list, const char *log)</div></div>
<div class="ttc" id="logagent-plugin-api_8h_html_a9f828a69257b510a17907c1a3ffc29d1"><div class="ttname"><a href="logagent-plugin-api_8h.html#a9f828a69257b510a17907c1a3ffc29d1">logagent_plugin_env_init</a></div><div class="ttdeci">int logagent_plugin_env_init(void **context)</div></div>
<div class="ttc" id="logagent-plugin-api_8h_html_ae01dcc8ad838b79d7441a7b804f9f6c7"><div class="ttname"><a href="logagent-plugin-api_8h.html#ae01dcc8ad838b79d7441a7b804f9f6c7">logagent_plugin_init</a></div><div class="ttdeci">int logagent_plugin_init(void *gconfig, void **context)</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>
